from time import time
import sys
sys.path.insert(0,'../..')
from rmpoly import RPoly
try:
  from gmpy import mpz
except:
  mpz = int


N = 100
rp = RPoly(['x%d' % i for i in range(N-1,-1,-1)], 3,mpz)
x = rp.gens()
p = 1 + sum(x)

t1 = time()
p2 = p*(p+1)
t2 = time()
#print p2
assert p2.coeff(x[6]*x[82]) == 2
print '%s p*p1 t=%.2f' %(sys.argv,t2 - t1)
